
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.net.Socket;

/**
 * @author Gislene
 */
public class Jogador {

    private String nome;
    private int cc = 0; //creditos conquistados
    private Double pontos = 0.0;
    
    private Socket novaConexao;
    private DataOutputStream stream_saida;
    private DataInputStream stream_entrada;
    
    
    public Jogador(String nome, Socket novaConexao)
    {
        this.nome = nome;
        this.novaConexao = novaConexao;
        
        try{
            stream_saida = new DataOutputStream(novaConexao.getOutputStream());
            stream_entrada = new DataInputStream(novaConexao.getInputStream());
        }
        catch (Exception e)
        {
            
        }
                
    }
    
    
    public void setnome(String nome)
    {
        this.nome = nome;
    }
    
    public void setcc(int cc)
    {
        this.cc = this.cc + cc;
    }
        
    public void setpontos(Double pontos)
    {
        this.pontos = pontos;
    }
    
    public String getnome()
    {
        return nome;
    }
    
    public Socket getconexao()
    {
        return novaConexao;
    }
    
    public DataOutputStream getstreamsaida()
    {
        return stream_saida;
    }
    
    public DataInputStream getstreamentrada()
    {
        return stream_entrada;
    }
    public int getcc()
    {
        return cc;
    }
    
    public double getpontos()
    {
        return pontos;
    }
}
